from django.contrib.syndication.feeds import Feed
from models import Course

class LatestEntries(Feed):
    title = "NTU OCW - Latest lectures"
    link = "/ntuocw/rss/latest"
    description = "The latest NTU OCW lectures"

    def items(self):
        return Course.objects.order_by('-publishDate')[:5]
